﻿using SGSBillBoard.Model;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SGSBillBoard.Context
{
    public class SGSContext : DbContext
    {
        public SGSContext() : base("SGSContext")
        {
            //Database.SetInitializer<SGSContext>(new SGSInitializer());
        }
        public DbSet<Player> Players { get; set; }

        public DbSet<Session> Sessions { get; set; }

        public DbSet<Fighter> Fighters { get; set; }

        public DbSet<Score> Scores { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {

            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
            base.OnModelCreating(modelBuilder);
        }
    }
}

